import request from '@/utils/request'

/**
 * 获取最新公告
 */
export function getNewNotice(data) {
  return request({
    url: '/notice/getNew',
    method: 'get',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 线索总数
 * @param {*} data
 */
export function getLeadsStatis(data) {
  return request({
    url: 'crmInstrument/leadsStatis',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 学员总数
 * @param {*} data
 */
export function getNumStatis(data) {
  return request({
    url: 'crmInstrument/numStatis',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 金额统计
 * @param {*} data
 */
export function getMoneyStatis(data) {
  return request({
    url: 'crmInstrument/moneyStatis',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 销售排行
 * @param {*} data
 */
export function getRankStatis(data) {
  return request({
    url: 'crmInstrument/rankStatis',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 销售简报
 * @param {*} data
 */
export function crmQueryBulletinAPI(data) {
  return request({
    url: 'crmInstrument/querySalesData',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 数据汇总
 * @param {*} data
 */
export function queryDataInfo(data) {
  return request({
    url: 'crmInstrument/queryDataInfo',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 销售简报列表
 */
export function crmIndexIndexListAPI(data) {
  return request({
    url: 'crmInstrument/queryBulletinInfo',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 简报跟进记录数量
 * @param {*} data
 */
export function crmQueryRecordConuntAPI(data) {
  return request({
    url: 'crmInstrument/queryRecordCount',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 业绩指标
 * @param {*} data
 */
export function crmIndexAchievementDataAPI(data) {
  return request({
    url: 'crmInstrument/queryPerformance',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 线索统计
 * @param {*} data
 */
export function crmPeriodsStatisticsDataAPI(data) {
  return request({
    url: 'crmInstrument/queryPeriodsStatisticsData',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 线索/学员统计
 * @param {*} data
 */
export function crmQueryStatisticsCurveAPI(data) {
  return request({
    url: 'crmInstrument/queryStatisticsCurve',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 销售漏斗
 * @param {*} data
 */
export function crmIndexFunnelAPI(data) {
  return request({
    url: 'crmInstrument/sellFunnel',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 销售漏斗详情
 * @param {*} data
 */
export function crmInstrumentSellFunnelBusinessListAPI(data) {
  return request({
    url: 'crmInstrument/sellFunnelBusinessList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 销售趋势
 * @param {*} data
 */
export function crmIndexSaletrendAPI(data) {
  return request({
    url: 'crmInstrument/salesTrend',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 获取简报 跟进记录信息
 * @param {*} data
 */
export function crmIndexGetRecordListAPI(data) {
  data.label = data.crmType
  return request({
    url: 'crmInstrument/queryRecordList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 遗忘提醒
 * @param {*} data
 */
export function crmIndexForgottenCustomerAPI(data) {
  return request({
    url: 'crmInstrument/forgottenCustomerCount',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 遗忘提醒详情
 * @param {*} data
 */
export function crmIndexForgottenCustomerListAPI(data) {
  return request({
    url: 'crmInstrument/forgottenCustomerPageList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 排行榜
 * @param {*} data
 */
export function crmIndexRankingAPI(data) {
  return request({
    url: 'biRanking/ranking',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 仪表盘排序
 * @param {*} data
 */
export function crmIndexSortAPI(data) {
  return request({
    url: 'crmInstrument/queryModelSort',
    method: 'post',
    data: data
  })
}

/**
 * 仪表盘排序设置
 * @param {*} data
 */
export function crmIndexSetSortAPI(data) {
  return request({
    url: 'crmInstrument/setModelSort',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 逾期未联系学员接口
 * @param {*} data
 */
export function crmIndexUnContactCustomerAPI(data) {
  return request({
    url: 'crmInstrument/unContactCustomerPageList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 查询每日表单数量-市场部
 * @param {*} 
 */
export function queryEverydayFormCount(data) {
  return request({
    url: 'crmInstrument/queryEverydayFormCount',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 查询查询渠道转化-市场部
 * @param {*} 
 */
 export function queryDataFromTransfer(data) {
  return request({
    url: 'crmInstrument/queryDataFromTransfer',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 查询市场部销售数据
 * @param {*} 
 */
 export function queryMarketingDepartmentSalesData(data) {
  return request({
    url: '/crmInstrument/queryMarketingDepartmentSalesData',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 查询销售部销售数据
 * @param {*} 
 */
 export function querySalesDepartmentSalesData(data) {
  return request({
    url: '/crmInstrument/querySalesDepartmentSalesData',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 查询每日成交数量-销售部
 * @param {*} 
 */
 export function queryDaysDealCount(data) {
  return request({
    url: 'crmInstrument/queryDaysDealCount',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 查询教学部销售数据信息
 * @param {*} 
 */
 export function queryTeachingDepartmentSalesData(data) {
  return request({
    url: 'crmInstrument/queryTeachingDepartmentData',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 查询
 * @param {*} 
 */
 export function queryTeachingDepartmentTableData(data) {
  return request({
    url: 'crmInstrument/queryTeachingDepartmentTableData',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 查询销售仪表盘数据
 * @param {*} 
 */
 export function querySalesDepartmentDashboardData(data) {
  return request({
    url: 'crmInstrument/querySalesDepartmentDashboardData',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * 查询销售仪表盘课程数据
 * @param {*} 
 */
 export function queryStatDataForClassData(data) {
  return request({
    url: 'crmInstrument/queryStatDataForClassData',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
